<script setup>
import { ref, useTemplateRef, onMounted } from 'vue'

const list = ref([
  /* ... */
  1, 2, 3, 4, 5, 6, 7, 8, 9, 10
])

const itemRefs = useTemplateRef('items')

onMounted(() => console.log(itemRefs.value))
</script>
<template>
  <ul>
    <li v-for="item in list" ref="items">
      {{ item }}
    </li>
  </ul>
</template>
